<template>
  <div>
    <van-tabs v-model="active">
      <van-tab title="店铺公告">
        <van-cell-group v-for="(item, index) in list1" :key="index">
          <van-cell :title="item.title" :label="item.create_time">
            <template slot="icon">
              <img :src="'http://video.zjsxjy.com/wechat' + item.face" alt="" />
            </template>
          </van-cell>
        </van-cell-group>
      </van-tab>
      <van-tab title="回复我的">内容 2</van-tab>
    </van-tabs>
  </div>
</template>

<script>
import { messageCenter } from '@/api'
export default {
  data() {
    return {
      list1: '',
      active: 0,
    }
  },
  created() {
    this.getList1()
  },
  methods: {
    async getList1() {
      try {
        const { data: res } = await messageCenter({
          uid: this.$store.state.uid,
          page: 1,
          type: 3,
        })
        console.log(res, '模板')
        this.list1 = res.data
      } catch (err) {
        console.log(err)
      }
    },
  },
}
</script>
<style scoped></style>
